package com.bkgy.modular.tpdodata_cal1630.controller;

import com.alibaba.fastjson.JSONObject;
import com.bkgy.modular.tpdodata_cal1630.service.impl.TPdoDataCal1630ServiceImpl;
import com.bkgy.sys.common.entity.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Author:Lipeng Zhao
 * Description:
 *
 * @Date:Created In 19:15 2025/5/10
 */
@RestController
@RequestMapping("/tPd0DataCal1630")
public class TPdoData1630Controller {

    @Autowired
    private TPdoDataCal1630ServiceImpl tPdoDataCal1630Service;


    /**
     * 分页查看记录
     * @param data json字符串
     */
    @CrossOrigin
    @RequestMapping(value = {"/findByPage"}, method = RequestMethod.POST)
    @ResponseBody
    public ResultData findDataByPage(@RequestBody String data) {
        return tPdoDataCal1630Service.findDataByPage(data);
    }

    /**
     * 分页查看历史卷轧制力，弯辊力AI设定值
     * @param data json字符串
     */
    @CrossOrigin
    @RequestMapping(value = {"/findHistorySetValueByPage"}, method = RequestMethod.POST)
    @ResponseBody
    public ResultData findHistorySetValueByPage(@RequestBody String data) {
        return tPdoDataCal1630Service.findHistorySetValueByPage(data);
    }

    @CrossOrigin
    @RequestMapping(value = {"/findHistoryFlatnessPercentage"}, method = RequestMethod.POST)
    @ResponseBody
    public ResultData findHistoryFlatnessPercentage(@RequestBody String data) {
        return tPdoDataCal1630Service.findHistoryFlatnessPercentage(data);
    }

    @CrossOrigin
    @RequestMapping(value = {"/findTensionPercentage"}, method = RequestMethod.POST)
    @ResponseBody
    public ResultData findTensionPercentage(@RequestBody JSONObject jsonObject) {
        return tPdoDataCal1630Service.findTensionPercentage(jsonObject);
    }

    @CrossOrigin
    @RequestMapping(value = {"/findTensionData"}, method = RequestMethod.POST)
    @ResponseBody
    public ResultData findTensionData(@RequestBody String data) {
        return tPdoDataCal1630Service.findTensionData(data);
    }



}
